package com.itheima.test;

import com.itheima.service.IAccountService;
import com.itheima.service.impl.AccountServiceImpl;
import com.itheima.utils.TransactionManager;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author yuany
 * @date 2019/5/29 20:10
 **/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationcontext.xml")
public class test01 {

    @Autowired
    private IAccountService service;

    @Test
    public void test(){
//        ApplicationContext app=new ClassPathXmlApplicationContext("applicationcontext.xml");
//        IAccountService service = (IAccountService) app.getBean("accountServiceImpl");
        //serviceImpl.findAllAccount();
        service.transfer("YY","LJ",50.00F);
    }
}
